cmake_minimum_required(VERSION 3.15)
project(test_use_ffmpeg C CXX)

include_directories(/home/madengyun/MyGit/FFmpeg/build/install/include)
file(GLOB FFMPEG_LIBS /home/madengyun/MyGit/FFmpeg/build/install/lib/lib*.a)

set(OpenCV_DIR /home/madengyun/MyGit/opencv/build/install/lib/cmake/opencv4)
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})

add_executable(main main.cc)
target_link_libraries(main "-Wl,--start-group" ${FFMPEG_LIBS} ${OpenCV_LIBRARIES} x264 "-Wl,--end-group" pthread z)